<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>simvoc.core.cluster_sim.Cluster</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="simvoc-module.html">Package&nbsp;simvoc</a> ::
        <a href="simvoc.core-module.html">Package&nbsp;core</a> ::
        <a href="simvoc.core.cluster_sim-module.html">Module&nbsp;cluster_sim</a> ::
        Class&nbsp;Cluster
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Cluster</h1><p class="nomargin-top"><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_simvoc_c_3" name="uml_class_diagram_for_simvoc_c_3">
<area shape="rect" id="node3" href="simvoc.core.cluster_sim.Cluster-class.html#__init__" title="x.__init__(...) initializes x; see x.__class__.__doc__ for signature" alt="" coords="17,39,387,57"/>
<area shape="rect" id="node3" href="simvoc.core.cluster_sim.Cluster-class.html#add_machine" title="Adds an *existing* machine to the cluster." alt="" coords="17,57,387,76"/>
<area shape="rect" id="node3" href="simvoc.core.cluster_sim.Cluster-class.html#add_machines" title="Adds a list of *existing* machines to the cluster." alt="" coords="17,76,387,95"/>
<area shape="rect" id="node3" href="simvoc.core.cluster_sim.Cluster-class.html#remove_machine" title="Removes a Machine object from the cluster, *without* removing the machine &#160;from the scheduler pool." alt="" coords="17,95,387,113"/>
<area shape="rect" id="node3" href="simvoc.core.cluster_sim.Cluster-class.html#remove_machines" title="Removes a list of Machine objects from the clause, *without* removing them &#160;from the scheduler pool." alt="" coords="17,113,387,132"/>
<area shape="rect" id="node3" href="simvoc.core.cluster_sim.Cluster-class.html#grow" title="Adds new machines to the cluster, provided count is greater than zero." alt="" coords="17,132,387,151"/>
<area shape="rect" id="node3" href="simvoc.core.cluster_sim.Cluster-class.html#shrink" title="Shrinks the cluster by a specified number of machines." alt="" coords="17,151,387,169"/>
<area shape="rect" id="node3" href="simvoc.core.cluster_sim.Cluster-class.html#add_scheduler" title="Add a scheduler to the list of those known to the cluster." alt="" coords="17,169,387,188"/>
<area shape="rect" id="node3" href="simvoc.core.cluster_sim.Cluster-class.html#remove_scheduler" title="Removes a scheduler from the list of schedulers known to the cluster." alt="" coords="17,188,387,207"/>
<area shape="rect" id="node3" href="simvoc.core.cluster_sim.Cluster-class.html#get_scheduler" title="Returns a reference to a scheduler based on the scheduler name." alt="" coords="17,207,387,225"/>
<area shape="rect" id="node3" href="simvoc.core.cluster_sim.Cluster-class.html#get_cpu_count" title="Returns: &#160;total number of machines in the cluster" alt="" coords="17,225,387,244"/>
<area shape="rect" id="node3" href="simvoc.core.cluster_sim.Cluster-class.html#get_actual_idle_count" title="Returns: &#160;total number of idle machines in the cluster" alt="" coords="17,244,387,263"/>
<area shape="rect" id="node3" href="simvoc.core.cluster_sim.Cluster-class.html#get_waiting_count" title="Returns: &#160;total number of jobs waiting on all schedulers known to the cluster" alt="" coords="17,263,387,281"/>
<area shape="rect" id="node3" href="simvoc.core.cluster_sim.Cluster-class.html#get_completed_count" title="Returns: &#160;total number of jobs completed on all schedulers known to the cluster" alt="" coords="17,300,387,319"/>
<area shape="rect" id="node1" href="simvoc.core.cluster_sim.Cluster-class.html" title="Clusters represent collections of computing resources (Machines) and one or more schedulers (whose targets may overlap!)." alt="" coords="5,6,397,325"/>
<area shape="rect" id="node2" href="simvoc.core.voc_sim.VOC-class.html" title="Representation of the mechanism behind a Virtual Organization Cluster." alt="" coords="145,345,260,383"/>
</map>
  <img src="uml_class_diagram_for_simvoc_c_3.gif" alt='' usemap="#uml_class_diagram_for_simvoc_c_3" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<p>Clusters represent collections of computing resources (Machines) and 
  one or more schedulers (whose targets may overlap!). Individual resources
  (Machines) generally should not be shared between clusters.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">simobj</span>,
        <span class="summary-sig-arg">factory</span>=<span class="summary-sig-default">MachineFactory()</span>,
        <span class="summary-sig-arg">**kwds</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#add_machine" class="summary-sig-name">add_machine</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">machine</span>)</span><br />
      Adds an *existing* machine to the cluster.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.add_machine">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#add_machines" class="summary-sig-name">add_machines</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">machines</span>)</span><br />
      Adds a list of *existing* machines to the cluster.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.add_machines">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#remove_machine" class="summary-sig-name">remove_machine</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">machine</span>)</span><br />
      Removes a Machine object from the cluster, *without* removing the 
      machine from the scheduler pool.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.remove_machine">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#remove_machines" class="summary-sig-name">remove_machines</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">machines</span>)</span><br />
      Removes a list of Machine objects from the clause, *without* removing
      them from the scheduler pool.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.remove_machines">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#grow" class="summary-sig-name">grow</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">count</span>,
        <span class="summary-sig-arg">profile</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span><br />
      Adds new machines to the cluster, provided count is greater than 
      zero.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.grow">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#shrink" class="summary-sig-name">shrink</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">count</span>,
        <span class="summary-sig-arg">kill_busy</span>=<span class="summary-sig-default">True</span>)</span><br />
      Shrinks the cluster by a specified number of machines.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.shrink">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#add_scheduler" class="summary-sig-name">add_scheduler</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">sched</span>)</span><br />
      Add a scheduler to the list of those known to the cluster.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.add_scheduler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#remove_scheduler" class="summary-sig-name">remove_scheduler</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span><br />
      Removes a scheduler from the list of schedulers known to the cluster.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.remove_scheduler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#get_scheduler" class="summary-sig-name">get_scheduler</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span><br />
      Returns a reference to a scheduler based on the scheduler name.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_scheduler">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">int</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#get_cpu_count" class="summary-sig-name">get_cpu_count</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns:
      total number of machines in the cluster</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_cpu_count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">int</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#get_actual_idle_count" class="summary-sig-name">get_actual_idle_count</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns:
      total number of idle machines in the cluster</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_actual_idle_count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">int</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#get_waiting_count" class="summary-sig-name">get_waiting_count</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns:
      total number of jobs waiting on all schedulers known to the cluster</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_waiting_count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">int</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#get_running_count" class="summary-sig-name">get_running_count</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns:
      total number of jobs running on all schedulers known to the cluster</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_running_count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">int</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#get_total_queue_size" class="summary-sig-name">get_total_queue_size</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns:
      total queue size (running+waiting) on all schedulers known to the 
      cluster</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_total_queue_size">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">int</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="simvoc.core.cluster_sim.Cluster-class.html#get_completed_count" class="summary-sig-name">get_completed_count</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns:
      total number of jobs completed on all schedulers known to the cluster</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_completed_count">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">simobj</span>,
        <span class="sig-arg">factory</span>=<span class="sig-default">MachineFactory()</span>,
        <span class="sig-arg">**kwds</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>name</code></strong> (str) - Name of this cluster. For grid-level simulations, cluster names 
          should be unique.</li>
        <li><strong class="pname"><code>simobj</code></strong> - Reference to the simulator object</li>
        <li><strong class="pname"><code>factory</code></strong> - MachineFactory instance used when creating new machines</li>
        <li><strong class="pname"><code>kwds</code></strong> - Cluster extra data, which will be passed to each machine created 
          whenever the cluster is resized</li>
    </ul></dd>
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="add_machine"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">add_machine</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">machine</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.add_machine">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Adds an *existing* machine to the cluster. If a new machine needs to 
  be created, use grow() instead. Note that this method does NOT add the 
  machine as a target to any scheduler.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>machine</code></strong> - Machine object to add to the cluster</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="add_machines"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">add_machines</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">machines</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.add_machines">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Adds a list of *existing* machines to the cluster. If new machines 
  need to be created, use grow() instead. Note that this method does NOT 
  add any of the machines as a target to any scheduler.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>machines</code></strong> - List of Machine objects to add to the cluster</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="remove_machine"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">remove_machine</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">machine</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.remove_machine">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Removes a Machine object from the cluster, *without* removing the 
  machine from the scheduler pool. For most purposes, use shrink() 
  instead.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>machine</code></strong> - Machine object to remove from the cluster</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="remove_machines"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">remove_machines</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">machines</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.remove_machines">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Removes a list of Machine objects from the clause, *without* removing 
  them from the scheduler pool. For most purposes, use shrink() 
  instead.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>machines</code></strong> - List of Machine objects to remove from the cluster</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="grow"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">grow</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">count</span>,
        <span class="sig-arg">profile</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.grow">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Adds new machines to the cluster, provided count is greater than zero.
  Machines will be created using the machine factory specified in the class
  constructor. Note that this method does NOT add machines to any scheduler
  pool.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>count</code></strong> (int) - Number of machines to add (positive) or subtract (negative) to or
          from the cluster</li>
        <li><strong class="pname"><code>profile</code></strong> (str) - Optional machine profile name, for selecting machine 
          configurations</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>list of new Machine objects that have been added</dd>
  </dl>
</td></tr></table>
</div>
<a name="shrink"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">shrink</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">count</span>,
        <span class="sig-arg">kill_busy</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.shrink">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Shrinks the cluster by a specified number of machines. Idle machines 
  will be selected for removal first, following by randomly chosen (using 
  the simulator random source) busy machines (if kill_busy is True). Upon 
  removal, machines will be terminated using the shut_down() method of the 
  Machine object. If a request would attempt to remove more machines than 
  are present in the cluster, no machines will be removed, and an Exception
  will occur.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>count</code></strong> (int) - Number of machines to be removed</li>
        <li><strong class="pname"><code>kill_busy</code></strong> (bool) - Flag to indicate whether busy machines should be removed in order
          to reach the desired shrink count</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>list of Machine objects that have been removed. Note that fewer 
          machines than requested may have been removed, if kill_busy is 
          False.</dd>
  </dl>
</td></tr></table>
</div>
<a name="add_scheduler"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">add_scheduler</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">sched</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.add_scheduler">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Add a scheduler to the list of those known to the cluster. Note that 
  this method does NOT add any machines to the scheduler pool.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>name</code></strong> (str) - Name of the scheduler</li>
        <li><strong class="pname"><code>sched</code></strong> - Scheduler object</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="remove_scheduler"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">remove_scheduler</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.remove_scheduler">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Removes a scheduler from the list of schedulers known to the cluster. 
  This method does NOT remove any machines from the scheduler pool.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>name</code></strong> (str) - Name of the scheduler</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="get_scheduler"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_scheduler</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_scheduler">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns a reference to a scheduler based on the scheduler name. If the
  requested name is an empty string (default), then a reference to an 
  arbitrary scheduler known to the cluster will be returned. Otherwise, a 
  reference to the requested scheduler will be returned, if the scheduler 
  is known to the cluster. If an unknown scheduler is requested, None is 
  returned.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>name</code></strong> (str) - Name of the scheduler</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="get_cpu_count"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_cpu_count</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_cpu_count">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
    <dt>Returns: int</dt>
        <dd>total number of machines in the cluster</dd>
  </dl>
</td></tr></table>
</div>
<a name="get_actual_idle_count"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_actual_idle_count</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_actual_idle_count">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
    <dt>Returns: int</dt>
        <dd>total number of idle machines in the cluster</dd>
  </dl>
</td></tr></table>
</div>
<a name="get_waiting_count"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_waiting_count</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_waiting_count">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
    <dt>Returns: int</dt>
        <dd>total number of jobs waiting on all schedulers known to the 
          cluster</dd>
  </dl>
</td></tr></table>
</div>
<a name="get_running_count"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_running_count</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_running_count">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
    <dt>Returns: int</dt>
        <dd>total number of jobs running on all schedulers known to the 
          cluster</dd>
  </dl>
</td></tr></table>
</div>
<a name="get_total_queue_size"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_total_queue_size</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_total_queue_size">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
    <dt>Returns: int</dt>
        <dd>total queue size (running+waiting) on all schedulers known to the
          cluster</dd>
  </dl>
</td></tr></table>
</div>
<a name="get_completed_count"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_completed_count</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="simvoc.core.cluster_sim-pysrc.html#Cluster.get_completed_count">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
    <dt>Returns: int</dt>
        <dd>total number of jobs completed on all schedulers known to the 
          cluster</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="simvoc-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >SimVOC</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0 on Fri Oct 23 11:04:29 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
